package com.etc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class GEController {

    // @PathVariable("viewname") 路径的通配
    @RequestMapping("jsp_{viewname}.action")
    public ModelAndView ge(@PathVariable("viewname") String viewname) {

        return new ModelAndView(viewname); // 视图解析器 /web-inf/jsp/ + viewname + .jsp
    }

}
